home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / HyperCard / Month and DayOfWeek XFCN / month.c < prev    next >
C/C++ Source or Header  |  1993-02-04  |  594b  |  34 lines

  1. /*    month.c
  2.     4th February 93
  3.     
  4.     by
  5.     Jerome Chan
  6.     
  7.     This is an XFCN that will return the local month string.
  8.     Thanks to Jon Pugh for _some_ form of code.
  9.     All system calls are found in Inside Mac Vol 1 so I assume it works on all
  10.     systems.
  11. */
  12.  
  13. #include <HyperXCmd.h>
  14. #include <SetupA4.h>
  15. #include <OSUtils.h>
  16. #include <Packages.h>
  17.  
  18. DateTimeRec today ;
  19. Intl1Hndl    database ;
  20.  
  21. pascal main(XCmdPtr paramPtr)    {
  22.  
  23.     RememberA0();
  24.     SetUpA4();
  25.     
  26.     GetTime(&today) ;
  27.  
  28.     database = (Intl1Hndl) IUGetIntl(1) ;
  29.  
  30.     paramPtr->returnValue=PasToZero( paramPtr, (**database).months[today.month-1] ) ;
  31.  
  32.     RestoreA4();
  33.  
  34. }